<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //1.把数字型转换为字符串型 变量.tostring()
        var num = 10
        var str = num.toString();
        console.log(str);
        console.log(typeof str);
        //2.我们利用 String(变量)  *这里要记住是大写S
        console.log(String(num));
        //3.利用 + 拼接字符串的方法实现转换效果 隐式转换  *常用
        console.log(num + '');
    </script>
</head>

<body>

</body>

</html>